﻿using System.Data;
using MyFloridaHouse.libSvDTO;

namespace MyFloridaHouse.DataAccess.Extensions
{
	/// <summary>
	/// [Obsolete] DataDictionaryPartDTODataContract
	/// </summary>
    public static class DataDictionaryPartDTODataContract
    {
		//Todo: Remove unused code.
		/// <summary>
		/// [Obsolete] DataContract.
		/// </summary>
		/// <param name="rdr">The RDR.</param>
		/// <returns></returns>
        public static DataDictionaryPartDTO DataContract(IDataReader rdr)
        {
            var newItem = new DataDictionaryPartDTO
                          	{
                          		dataID = (int) rdr["dataID"],
                          		dataItem = rdr["dataItem"].ToString(),
                          		isData = (bool) rdr["isData"],
                          		parent = (int) rdr["parent"],
                          		isChildRequired = (bool) rdr["isChildRequired"]
                          	};
			return (newItem);
        }

    }
}
